<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <style>
        #root button {
            padding: 5px;
            margin: 5px;
        }

        #root button.active {
            background: red;
        }

        #root div {
            width: 500px;
            height: 300px;
            border: 1px solid green;
        }
    </style>
    <title>Title</title>
    <script src="../lib/vue.min.js"></script>
</head>
<body>
    <div id="root">
        <button @click="index=0" :class="{active:index===0}">体育</button>
        <button @click="index=1" :class="{active:index===1}">娱乐</button>
        <button @click="index=2" :class="{active:index===2}">财经</button>
        <div v-show="index===0">体育新闻列表</div>
        <div v-show="index===1">娱乐新闻列表</div>
        <div v-show="index===2">财经新闻列表</div>
    </div>
</body>
<script>
    new Vue({
        el:"#root",
        data:{
            index:0
        }
    })
</script>
</html>